cmake_minimum_required(VERSION 3.10)

project(userServiceServer LANGUAGES CXX)

#指定 C++ 标准为 C++17，并要求编译器必须支持该标准。
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)


find_package(protobuf CONFIG REQUIRED)
find_package(gRPC CONFIG REQUIRED)

#找出src下的源文件
file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc)

add_executable(userServiceServer server.cc ${SOURCES})
target_include_directories(userServiceServer PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include/)
target_link_libraries(userServiceServer PRIVATE protobuf::libprotobuf gRPC::grpc++ gRPC::grpc++_reflection)
